<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>10-伪元素选择器使用场景-字体图标</title>
  <style>
    /* 字体声明 */
    @font-face {
      font-family: 'icomoon';
      src: url('fonts/icomoon.eot?p4ssmb');
      src: url('fonts/icomoon.eot?p4ssmb#iefix') format('embedded-opentype'),
        url('fonts/icomoon.ttf?p4ssmb') format('truetype'),
        url('fonts/icomoon.woff?p4ssmb') format('woff'),
        url('fonts/icomoon.svg?p4ssmb#icomoon') format('svg');
      font-weight: normal;
      font-style: normal;
      font-display: block;
    }

    div {
      position: relative;
      width: 200px;
      height: 40px;
      border: 1px solid red;
    }

    /*  */
    div::after {
      position: absolute;
      top: 10px;
      right: 10px;
      color: red;
      font-family: 'icomoon';
      /* content: ''; */
      /* 小三角unicode编码 */
      content: '\e91e';
    }
  </style>
</head>

<body>
  <div></div>
</body>

</html>